/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View.maestros;

import View.components.Index;
import javax.swing.JDesktopPane;

/**
 *
 * @author walter
 */
public class Frm_EliminarEmpleado extends javax.swing.JDesktopPane {

    /**
     * Creates new form Frm_CambiarContrasenha
     */
    public Frm_EliminarEmpleado() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlCambiarContrasenha = new javax.swing.JPanel();
        lblConfirmacionEliminacion = new javax.swing.JLabel();
        btnSi = new javax.swing.JButton();
        btnNo = new javax.swing.JButton();

        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        pnlCambiarContrasenha.setBorder(javax.swing.BorderFactory.createTitledBorder("Eliminar empleado"));

        lblConfirmacionEliminacion.setText("¿Está seguro que desea eliminar los datos de este empleado?");

        btnSi.setText("Sí");
        btnSi.setMaximumSize(new java.awt.Dimension(80, 30));
        btnSi.setMinimumSize(new java.awt.Dimension(80, 30));
        btnSi.setPreferredSize(new java.awt.Dimension(80, 30));
        btnSi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSiActionPerformed(evt);
            }
        });

        btnNo.setText("No");
        btnNo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlCambiarContrasenhaLayout = new javax.swing.GroupLayout(pnlCambiarContrasenha);
        pnlCambiarContrasenha.setLayout(pnlCambiarContrasenhaLayout);
        pnlCambiarContrasenhaLayout.setHorizontalGroup(
            pnlCambiarContrasenhaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCambiarContrasenhaLayout.createSequentialGroup()
                .addGroup(pnlCambiarContrasenhaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlCambiarContrasenhaLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lblConfirmacionEliminacion))
                    .addGroup(pnlCambiarContrasenhaLayout.createSequentialGroup()
                        .addGap(69, 69, 69)
                        .addComponent(btnSi, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27)
                        .addComponent(btnNo, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlCambiarContrasenhaLayout.setVerticalGroup(
            pnlCambiarContrasenhaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCambiarContrasenhaLayout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addComponent(lblConfirmacionEliminacion)
                .addGap(58, 58, 58)
                .addGroup(pnlCambiarContrasenhaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnNo)
                    .addComponent(btnSi, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap(31, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlCambiarContrasenha, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlCambiarContrasenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btnSiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSiActionPerformed
        cambiarVista( new Frm_BuscarEmpleado() ) ;
    }//GEN-LAST:event_btnSiActionPerformed
    
    private void cambiarVista( JDesktopPane panel ){
        ((Index)(this.getTopLevelAncestor())).changeDesktopPane( panel );
    }

    private void btnNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNoActionPerformed
        cambiarVista( new Frm_BuscarEmpleado() ) ;
    }//GEN-LAST:event_btnNoActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnNo;
    private javax.swing.JButton btnSi;
    private javax.swing.JLabel lblConfirmacionEliminacion;
    private javax.swing.JPanel pnlCambiarContrasenha;
    // End of variables declaration//GEN-END:variables
}
